<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
            "http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>



<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<META name="GENERATOR" content="hevea 1.08">
<LINK rel="stylesheet" type="text/css" href="libman.css">
<TITLE>
Common constraints
</TITLE>
</HEAD>
<BODY >
<A HREF="libman012.html"><IMG SRC ="previous_motif.gif" ALT="Previous"></A>
<A HREF="libman011.html"><IMG SRC ="contents_motif.gif" ALT="Up"></A>
<A HREF="libman014.html"><IMG SRC ="next_motif.gif" ALT="Next"></A>
<HR>

<H2 CLASS="section"><A NAME="htoc22">2.2</A>&nbsp;&nbsp;Common constraints</H2>
The constraints can be divided into the following groups:
<UL CLASS="itemize"><LI CLASS="li-itemize">
the numeric type constraints reals/1 and integers/1.
 Note that in this context, integers are considered a subset of the reals.<BR>
<BR>
<LI CLASS="li-itemize">the range constraints ::/2, <CODE>#::</CODE> and $::/2, which give upper
 and lower bounds to their variables. In addition, ::/2 and <CODE>#::</CODE>
 can also imply integrality.<BR>
<BR>
<LI CLASS="li-itemize">arithmetic equality, inequality and disequality over the mathematical
 real numbers, e.g.
 <CODE>$=</CODE>, <CODE>$&gt;=</CODE>, <CODE>&gt;</CODE>, <CODE>$\=</CODE> (and their symnonyms
 <CODE>=:=</CODE>, <CODE>&gt;=</CODE>, <CODE>&gt;</CODE>, <CODE>=\=</CODE>).
 Note that in this context,
 integers are considered a subset of the reals and can therefore
 occur in these constraints.<BR>
<BR>
<LI CLASS="li-itemize">arithmetic equality, inequality and disequality which in addition to
 the above constrain all variables within their arguments to integers.
 Syntactically, these generally have a leading <CODE>#</CODE>,
 e.g. <CODE>#=</CODE>, <CODE>#\=</CODE>, <CODE>#&lt;</CODE>.
</UL>
<BLOCKQUOTE CLASS="table"><DIV CLASS="center"><HR WIDTH="80%" SIZE=2></DIV>
<DIV CLASS="center">
<IMG SRC="libman001.gif"></DIV>
<UL CLASS="itemize"><LI CLASS="li-itemize">
 If integer bounds are given to the eplex version of <CODE>::/2</CODE> 
 the external solver does not consider this as an integrality constraint
 and only solves the continuous relaxation which can then be rounded
 to the next integer. To make the external solver solve a mixed
 integer problem, use the eplex version of integers/1.
 </UL>

<BR>
<BR>
<DIV CLASS="center">Table 2.1: Supported constraints for various arithmetic solvers</DIV><BR>
<BR>

<A NAME="commoncons"></A>
<DIV CLASS="center"><HR WIDTH="80%" SIZE=2></DIV></BLOCKQUOTE>
Not all constraints are supported by all the solvers. For example, the
eplex solver does not support any strict inequality constraints.
Table&nbsp;<A HREF="#commoncons">2.1</A> shows the constraints that are available
from the various constraint solvers.
In the table, a `yes' entry indicates that the
particular constraint is supported by the particular solver. Note
that some further restrictions may apply for a particular solver. For
example, the eplex solver can only handle linear expressions. Refer
to the documentation for each individual solver to see what restrictions
might apply.<BR>
<BR>
Note that the last line, labelled `arith', is not really a constraint
solver but represents just the standard arithmetic tests which require
all variables to be instantiated. This behaviour is provided by the
(automatically imported) module <TT>eclipse_language</TT>.<BR>
<BR>
It can be somewhat confusing that these standard arithmetic tests have the same
names as the corresponding constraints. One one hand, they have the same declarative
meaning. On the other hand, they are not really interchangeable because they
can only be used as tests, not as active constraints. 
The following synonyms are therefore provided to make the distinction visible
where needed, and to reduce the need for module-qualification:<BR>
<BR>
<DIV CLASS="center">
<TABLE BORDER=1 CELLSPACING=0 CELLPADDING=1>
<TR><TD ALIGN=center NOWRAP><CODE>$=/2</CODE></TD>
<TD ALIGN=center NOWRAP><CODE>=:=/2</CODE></TD>
</TR>
<TR><TD ALIGN=center NOWRAP><CODE>$\=/2</CODE></TD>
<TD ALIGN=center NOWRAP><CODE>=\=/2</CODE></TD>
</TR>
<TR><TD ALIGN=center NOWRAP><CODE>$&gt;=/2</CODE></TD>
<TD ALIGN=center NOWRAP><CODE>&gt;=/2</CODE></TD>
</TR>
<TR><TD ALIGN=center NOWRAP><CODE>$=&lt;/2</CODE></TD>
<TD ALIGN=center NOWRAP><CODE>=&lt;/2</CODE></TD>
</TR>
<TR><TD ALIGN=center NOWRAP><CODE>$&gt;/2</CODE></TD>
<TD ALIGN=center NOWRAP><CODE>&gt;/2</CODE></TD>
</TR>
<TR><TD ALIGN=center NOWRAP><CODE>$&lt;/2</CODE></TD>
<TD ALIGN=center NOWRAP><CODE>&lt;/2</CODE></TD>
</TR></TABLE>
</DIV><BR>
<BR>
<HR>
<A HREF="libman012.html"><IMG SRC ="previous_motif.gif" ALT="Previous"></A>
<A HREF="libman011.html"><IMG SRC ="contents_motif.gif" ALT="Up"></A>
<A HREF="libman014.html"><IMG SRC ="next_motif.gif" ALT="Next"></A>
</BODY>
</HTML>
